﻿using AVIS.OutBound.Orders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AVIS.OutBound.ThirdOrders
{
    /// <summary>
    /// AA接机订单的领域对象
    /// </summary>
    public interface IAAOrderManager
    {
        /// <summary>
        /// 判断是否存在指定Avis订单号的AA接机订单
        /// </summary>
        /// <param name="avisOrderNo">(必填)AVIS订单号</param>
        /// <returns></returns>
        bool IsExist(string avisOrderNo);

        /// <summary>
        /// 取消AA接机订单
        /// </summary>
        /// <param name="avisOrderNo">(必填)AVIS订单号</param>
        /// <returns></returns>
        bool CancelAAOrder(string avisOrderNo);

        /// <summary>
        /// 新插入AA接机订单
        /// </summary>
        /// <param name="order">Avis订单</param>
        /// <returns></returns>
        bool SaveOrder(Order order);

        /// <summary>
        /// 获取AA接机订单的详情信息（本地DB）
        /// </summary>
        /// <param name="avisOrderNo">(必填)AVIS订单号</param>
        /// <returns></returns>
        AAOrder GetDBOrder(string avisOrderNo);

        /// <summary>
        /// 更新AA接机订单到完成状态，真正用户提交AA订单的步骤，同时发生邮件通知
        /// 说明：在租车预订单提交过程中，会默认产生一个空的AA订单，然后在租车订单详情中点击链接才能完成AA接机订单的提交
        /// </summary>
        /// <param name="aaOrder">AA接机订单</param>
        /// <returns></returns>
        bool UpdateOrderToCompleted(AAOrder aaOrder);
    }
}
